package tech.edwardvan.springbootdemo.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author EdwardVan
 */
@Data
public class Demo {
    @ApiModelProperty(value = "联系人电话")
    @NotBlank(message = "手机号码不能为空")
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String phoneNumber;
}
